home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 November: Tool Chest / Dev.CD Nov 94.toast / Tool Chest / QuickDraw GX / QuickDraw GX Info / QuickDraw GX Interfaces / Interfaces & Libraries / interfaces / layout routines.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-04-30  |  10.6 KB  |  165 lines  |  [TEXT/MPS ]

  1. /* layout routines.h -- Line Layout calls
  2.  
  3.     by Eric Mader and Dave Opstad,
  4.     with special thanks to the following folks:
  5.         • Mark Davis, for starting it all off;
  6.         • Russ Sonnenschein, for many good ideas;
  7.         • Cary Clark, Dave Good, Rob Johnson, Keith McGreggor, and Chris Yerga for the graphics system;
  8.         • Richard Becker, Lynn Bekkala and Mike Reed for fonts and the font system;
  9.         • Robert Dierkes and the SQE team for testing and good ideas;
  10.         • Parry Kejriwal and Richard Klein, for font tools;
  11.         • Diane Patterson, for great patience in writing documentation;
  12.         • Hugo Ayala, Tom Dowdy, Dan Lipton, Sean Parent and the rest of the PrintShop;
  13.         • Mitch Allen for managing to manage us; and
  14.         • many other good folk at Apple!
  15. */
  16.  
  17. /* Copyright ©1988-1994 Apple Computer, Inc.  All rights reserved. */
  18.  
  19. #pragma once
  20.  
  21. #ifndef layoutRoutinesIncludes
  22. #define layoutRoutinesIncludes
  23.  
  24. #ifndef graphicsTypesIncludes
  25. #include "graphics types.h"
  26. #endif
  27.  
  28. #ifndef layoutTypesIncludes
  29. #include "layout types.h"
  30. #endif
  31.  
  32. #ifndef graphicsLinkageIncludes
  33. #include "graphics linkage.h"
  34. #endif
  35.  
  36. #ifdef __cplusplus
  37. extern "C" {
  38. #endif
  39.  
  40. gxShape GXNewLayout(long textRunCount, const short textRunLengths[], const void *text[],
  41.     long styleRunCount, const short styleRunLengths[], const gxStyle styles[], long levelRunCount,
  42.     const short levelRunLengths[], const short levels[], const gxLayoutOptions *layoutOptions,
  43.     const gxPoint *position) GXInlineCode(0x0, gxNeedClient|gxNeedHeap|gxNeedStack);
  44.  
  45. long GXGetLayout(gxShape layout, void *text, long *styleRunCount, short styleRunLengths[],
  46.     gxStyle styles[], long *levelRunCount, short levelRunLengths[], short levels[],
  47.     gxLayoutOptions *layoutOptions, gxPoint *position) GXInlineCode(0x1, gxNeedClient|gxNeedHeap|gxNeedStack);
  48.  
  49. void GXSetLayout(gxShape layout, long textRunCount, const short textRunLengths[], const void *text[],
  50.     long styleRunCount, const short styleRunLengths[], const gxStyle styles[], long levelRunCount,
  51.     const short levelRunLengths[], const short levels[], const gxLayoutOptions *layoutOptions,
  52.     const gxPoint *position) GXInlineCode(0x2, gxNeedClient|gxNeedHeap|gxNeedStack);
  53.  
  54. void GXDrawLayout(long textRunCount, const short textRunLengths[], const void *text[],
  55.     long styleRunCount, const short styleRunLengths[], const gxStyle styles[], long levelRunCount,
  56.     const short levelRunLengths[], const short levels[], const gxLayoutOptions *layoutOptions,
  57.     const gxPoint *position) GXInlineCode(0x3, gxNeedClient|gxNeedHeap|gxNeedStack);
  58.  
  59. void GXSetLayoutParts(gxShape layout, gxByteOffset oldStartOffset, gxByteOffset oldEndOffset,
  60.     long newTextRunCount, const short newTextRunLengths[], const void *newText[],
  61.     long newStyleRunCount, const short newStyleRunLengths[], const gxStyle newStyles[],
  62.     long newLevelRunCount, const short newLevelRunLengths[], const short newLevels[]) GXInlineCode(0x4, gxNeedClient|gxNeedHeap|gxNeedStack);
  63.  
  64. void GXSetLayoutShapeParts(gxShape layout, gxByteOffset startOffset, gxByteOffset endOffset,
  65.     gxShape insert) GXInlineCode(0x5, gxNeedClient|gxNeedHeap|gxNeedStack);
  66.  
  67. long GXGetLayoutParts(gxShape layout, gxByteOffset startOffset, gxByteOffset endOffset, void *text,
  68.     long *styleRunCount, short styleRunLengths[], gxStyle styles[], long *levelRunCount,
  69.     short levelRunLengths[], short levels[]) GXInlineCode(0x6, gxNeedClient|gxNeedHeap|gxNeedStack);
  70.  
  71. gxShape GXGetLayoutShapeParts(gxShape layout, gxByteOffset startOffset, gxByteOffset endOffset,
  72.     gxShape dest) GXInlineCode(0x7, gxNeedClient|gxNeedHeap|gxNeedStack);
  73.  
  74. long GXGetLayoutGlyphs(gxShape layout, gxGlyphcode *glyphs, gxPoint positions[], long advance[],
  75.     gxPoint tangents[], long *runCount, short styleRuns[], gxStyle glyphStyles[]) GXInlineCode(0x8, gxNeedClient|gxNeedHeap|gxNeedStack);
  76.  
  77. gxByteOffset GXHitTestLayout(gxShape layout, const gxPoint *hitDown, gxHighlightType highlightType,
  78.     gxLayoutHitInfo *hitInfo, gxShape hitTrackingArea) GXInlineCode(0x9, gxNeedClient|gxNeedHeap|gxNeedStack);
  79.  
  80. gxShape GXGetLayoutHighlight(gxShape layout, gxByteOffset startOffset, gxByteOffset endOffset,
  81.     gxHighlightType highlightType, gxShape highlight) GXInlineCode(0xa, gxNeedClient|gxNeedHeap|gxNeedStack);
  82.  
  83. gxShape GXGetLayoutVisualHighlight(gxShape layout, gxByteOffset startOffset, long startLeadingEdge,
  84.     gxByteOffset endOffset, long endLeadingEdge, gxHighlightType highlightType, gxShape highlight) GXInlineCode(0xb, gxNeedClient|gxNeedHeap|gxNeedStack);
  85.  
  86. gxShape GXGetLayoutCaret(gxShape layout, gxByteOffset offset, gxHighlightType highlightType,
  87.     gxCaretType caretType, gxShape caret) GXInlineCode(0xc, gxNeedClient|gxNeedHeap|gxNeedStack);
  88.  
  89. gxByteOffset GXGetLayoutBreakOffset(gxShape layout, gxByteOffset startOffset, Fixed lineWidth,
  90.     long hyphenationCount, const gxByteOffset hyphenationPoints[], boolean *startIsStaked,
  91.     gxByteOffset *priorStake, gxByteOffset *nextStake) GXInlineCode(0xd, gxNeedClient|gxNeedHeap|gxNeedStack);
  92.  
  93. Fixed GXGetLayoutRangeWidth(gxShape layout, gxByteOffset startOffset, gxByteOffset endOffset,
  94.     gxShape supplementaryText) GXInlineCode(0xe, gxNeedClient|gxNeedHeap|gxNeedStack);
  95.  
  96. gxShape GXNewLayoutFromRange(gxShape layout, gxByteOffset startOffset, gxByteOffset endOffset,
  97.     const gxLayoutOptions *layoutOptions, gxShape supplementaryText) GXInlineCode(0xf, gxNeedClient|gxNeedHeap|gxNeedStack);
  98.  
  99. gxShape GXGetCaretAngleArea(gxShape layout, const gxPoint *hitPoint, gxHighlightType highlightType,
  100.     gxShape caretArea, short *returnedRise, short *returnedRun) GXInlineCode(0x10, gxNeedClient|gxNeedHeap|gxNeedStack);
  101.  
  102. void GXGetStyleBaselineDeltas(gxStyle baseStyle, gxBaselineType baseType,
  103.     gxBaselineDeltas returnedDeltas) GXInlineCode(0x11, gxNeedClient|gxNeedHeap|gxNeedStack);
  104.  
  105. gxByteOffset GXGetRightVisualOffset(gxShape layout, gxByteOffset currentOffset) GXInlineCode(0x12, gxNeedClient|gxNeedHeap|gxNeedStack);
  106. gxByteOffset GXGetLeftVisualOffset(gxShape layout, gxByteOffset currentOffset) GXInlineCode(0x13, gxNeedClient|gxNeedHeap|gxNeedStack);
  107.  
  108. void GXGetCompoundCharacterLimits(gxShape layout, gxByteOffset trial, gxByteOffset *minOffset,
  109.     gxByteOffset *maxOffset, boolean *onBoundary) GXInlineCode(0x14, gxNeedClient|gxNeedHeap|gxNeedStack);
  110.  
  111. void GXGetOffsetGlyphs(gxShape layout, gxByteOffset trial, long leadingEdge,
  112.     gxLayoutOffsetState *offsetState, unsigned short *firstGlyph, unsigned short *secondGlyph) GXInlineCode(0x15, gxNeedClient|gxNeedHeap|gxNeedStack);
  113.  
  114. void GXGetGlyphOffset(gxShape layout, long trial, long onLeftTop, gxByteOffset *offset,
  115.     boolean *leadingEdge, boolean *wasRealCharacter) GXInlineCode(0x16, gxNeedClient|gxNeedHeap|gxNeedStack);
  116.  
  117. void GXGetLayoutSpan(gxShape layout, Fixed *lineAscent, Fixed *lineDescent) GXInlineCode(0x17, gxNeedClient|gxNeedHeap|gxNeedStack);
  118. void GXSetLayoutSpan(gxShape layout, Fixed lineAscent, Fixed lineDescent) GXInlineCode(0x18, gxNeedClient|gxNeedHeap|gxNeedStack);
  119.  
  120. void GXSetStyleRunControls(gxStyle target, const gxRunControls *runControls) GXInlineCode(0x19, gxNeedClient|gxNeedHeap|gxNeedStack);
  121. void GXSetStyleRunPriorityJustOverride(gxStyle target,
  122.     const gxPriorityJustificationOverride *priorityJustificationOverride) GXInlineCode(0x1a, gxNeedClient|gxNeedHeap|gxNeedStack);
  123. void GXSetStyleRunGlyphJustOverrides(gxStyle target, long count,
  124.     const gxGlyphJustificationOverride glyphJustificationOverrides[]) GXInlineCode(0x1b, gxNeedClient|gxNeedHeap|gxNeedStack);
  125. void GXSetStyleRunGlyphSubstitutions(gxStyle target, long count,
  126.     const gxGlyphSubstitution glyphSubstitutions[]) GXInlineCode(0x1c, gxNeedClient|gxNeedHeap|gxNeedStack);
  127. void GXSetStyleRunFeatures(gxStyle target, long count, const gxRunFeature runFeatures[]) GXInlineCode(0x1d, gxNeedClient|gxNeedHeap|gxNeedStack);
  128. void GXSetStyleRunKerningAdjustments(gxStyle target, long count,
  129.     const gxKerningAdjustment kerningAdjustments[]) GXInlineCode(0x1e, gxNeedClient|gxNeedHeap|gxNeedStack);
  130.  
  131. void GXSetShapeRunControls(gxShape target, const gxRunControls *runControls) GXInlineCode(0x1f, gxNeedClient|gxNeedHeap|gxNeedStack);
  132. void GXSetShapeRunPriorityJustOverride(gxShape target,
  133.     const gxPriorityJustificationOverride *priorityJustificationOverride) GXInlineCode(0x20, gxNeedClient|gxNeedHeap|gxNeedStack);
  134. void GXSetShapeRunGlyphJustOverrides(gxShape target, long count,
  135.     const gxGlyphJustificationOverride glyphJustificationOverrides[]) GXInlineCode(0x21, gxNeedClient|gxNeedHeap|gxNeedStack);
  136. void GXSetShapeRunGlyphSubstitutions(gxShape target, long count,
  137.     const gxGlyphSubstitution glyphSubstitutions[]) GXInlineCode(0x22, gxNeedClient|gxNeedHeap|gxNeedStack);
  138. void GXSetShapeRunFeatures(gxShape target, long count, const gxRunFeature runFeatures[]) GXInlineCode(0x23, gxNeedClient|gxNeedHeap|gxNeedStack);
  139. void GXSetShapeRunKerningAdjustments(gxShape target, long count,
  140.     const gxKerningAdjustment kerningAdjustments[]) GXInlineCode(0x24, gxNeedClient|gxNeedHeap|gxNeedStack);
  141.  
  142. long GXGetStyleRunControls(gxStyle source, gxRunControls *runControls) GXInlineCode(0x25, gxNeedClient|gxNeedHeap|gxNeedStack);
  143. long GXGetStyleRunPriorityJustOverride(gxStyle source,
  144.     gxPriorityJustificationOverride *priorityJustificationOverride) GXInlineCode(0x26, gxNeedClient|gxNeedHeap|gxNeedStack);
  145. long GXGetStyleRunGlyphJustOverrides(gxStyle source,
  146.     gxGlyphJustificationOverride glyphJustificationOverrides[]) GXInlineCode(0x27, gxNeedClient|gxNeedHeap|gxNeedStack);
  147. long GXGetStyleRunGlyphSubstitutions(gxStyle source, gxGlyphSubstitution glyphSubstitutions[]) GXInlineCode(0x28, gxNeedClient|gxNeedHeap|gxNeedStack);
  148. long GXGetStyleRunFeatures(gxStyle source, gxRunFeature runFeatures[]) GXInlineCode(0x29, gxNeedClient|gxNeedHeap|gxNeedStack);
  149. long GXGetStyleRunKerningAdjustments(gxStyle source, gxKerningAdjustment kerningAdjustments[]) GXInlineCode(0x2a, gxNeedClient|gxNeedHeap|gxNeedStack);
  150.  
  151. long GXGetShapeRunControls(gxShape source, gxRunControls *runControls) GXInlineCode(0x2b, gxNeedClient|gxNeedHeap|gxNeedStack);
  152. long GXGetShapeRunPriorityJustOverride(gxShape source,
  153.     gxPriorityJustificationOverride *priorityJustificationOverride) GXInlineCode(0x2c, gxNeedClient|gxNeedHeap|gxNeedStack);
  154. long GXGetShapeRunGlyphJustOverrides(gxShape source,
  155.     gxGlyphJustificationOverride glyphJustificationOverrides[]) GXInlineCode(0x2d, gxNeedClient|gxNeedHeap|gxNeedStack);
  156. long GXGetShapeRunGlyphSubstitutions(gxShape source, gxGlyphSubstitution glyphSubstitutions[]) GXInlineCode(0x2e, gxNeedClient|gxNeedHeap|gxNeedStack);
  157. long GXGetShapeRunFeatures(gxShape source, gxRunFeature runFeatures[]) GXInlineCode(0x2f, gxNeedClient|gxNeedHeap|gxNeedStack);
  158. long GXGetShapeRunKerningAdjustments(gxShape source, gxKerningAdjustment kerningAdjustments[]) GXInlineCode(0x30, gxNeedClient|gxNeedHeap|gxNeedStack);
  159.  
  160. #ifdef __cplusplus
  161. }
  162. #endif
  163.  
  164. #endif
  165.